/**
 * 
 */
package com.hera.base.servlet.designer;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;

/**
 * @author cmontes
 *
 */
public class FlowDesignerServlet extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = -225241408121178931L;

	/**
	 * 
	 */
	
	@Override
    protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
		System.out.println("enviando el diseñador");
		System.out.println("uri " + request.getRequestURI());
		/*
		if(request.getRequestURI().contains("flowdesigner.start")){
			response.sendRedirect("flowdesigner/demo_basic1.jsp");
		}else{
			*/
			RequestDispatcher rd = getServletContext().getNamedDispatcher("flowdesigner");
			HttpServletRequest wrapped = new HttpServletRequestWrapper(request){
				public String getServletPath(){
					return "";
				}
			};
			
			rd.forward(wrapped, response);
		//}
				
	}
	

}
